<template>
  <div class="p-4 space-y-4">
    <div class="text-xl font-bold text-blue-700 mb-2">formatAmount</div>
    <div class="text-gray-700 mb-2">金额格式化，千分位加逗号。</div>
    <div class="bg-white rounded-xl p-4 shadow">
      <div class="font-bold mb-2 text-blue-600">用法</div>
      <pre class="bg-blue-50 rounded p-3 text-sm text-blue-700 overflow-x-auto">
formatAmount(1234567.89)</pre
      >
    </div>
    <div class="bg-white rounded-xl p-4 shadow">
      <div class="font-bold mb-2 text-green-600">示例1</div>
      <pre class="bg-green-50 rounded p-3 text-sm text-green-700 overflow-x-auto">
formatAmount(1234567.89) // 1,234,567.89</pre
      >
    </div>
    <div class="bg-white rounded-xl p-4 shadow">
      <div class="font-bold mb-2 text-green-600">示例2</div>
      <pre class="bg-green-50 rounded p-3 text-sm text-green-700 overflow-x-auto">
formatAmount('1000') // 1,000.00</pre
      >
    </div>
    <div class="bg-white rounded-xl p-4 shadow border-l-4 border-blue-400">
      <div class="font-bold mb-2 text-gray-700">说明</div>
      <div class="text-xs text-gray-600 leading-relaxed">
        常用于金额展示，支持小数点后保留两位。
      </div>
    </div>
  </div>
</template>
